﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="AddNewSpendItem.aspx.cs" Inherits="pages_spend_AddNewSpendItem" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>项目添加</title>
    <script type="text/javascript" src="../../scripts/jquery/jquery-1.4.2.js"></script>
    <script type="text/javascript" src="../../scripts/system/member.js"></script>
    <link rel="stylesheet" type="text/css" href="../../css/main.css"/>
    <script type="text/javascript">
        function OnClearBtnClick() {
            document.getElementById("SpendItemNameTextBox").value = "";
            document.getElementById("ItemPriceTextBox").value = "";
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
        <asp:ObjectDataSource ID="SourceSpendType" runat="server" 
            DataObjectTypeName="SpendTypeDetail" DeleteMethod="DeleteEmployees" 
            OldValuesParameterFormatString="original_{0}" SelectMethod="GetEmployees" 
            TypeName="SpendTypeDB" UpdateMethod="UpdateEmployees"></asp:ObjectDataSource>
        <table width="730" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td height="34" style="background-image:../../images/bj2.gif"><strong>&nbsp;&nbsp;&nbsp;&nbsp;项目添加</strong></td>
          </tr>
          <tr>
            <td>&nbsp;</td>
          </tr>
          <tr>
            <td>
                <table width="700" border="0" align="center" cellpadding="0" cellspacing="0">
                    <tr>
                        <td>&nbsp;</td>
                    </tr>
                    <tr>
                        <td>
                            <table width="577" border="1" align="center" cellpadding="5" style="background-color:#999999">
                                <tr>
                                    <td align="center">消费项目名称：</td>
                                    <td><asp:TextBox ID="SpendItemNameTextBox" runat="server" />
                                        <asp:RequiredFieldValidator ID="NameRequiredFieldValidator" runat="server" 
                                            ControlToValidate="SpendItemNameTextBox" ErrorMessage="RequiredFieldValidator" 
                                            ForeColor="Red">项目名称不能为空</asp:RequiredFieldValidator>
                                    </td>
                                </tr>
                                <tr>
                                    <td align="center">消费项目价格：</td>
                                    <td><asp:TextBox ID="ItemPriceTextBox" runat="server" />
                                        <asp:RegularExpressionValidator ID="PriceRegularExpressionValidator" 
                                            runat="server" ErrorMessage="RegularExpressionValidator" 
                                            ForeColor="Red" ValidationExpression="\d+\.?[\d]{0,2}" 
                                            ControlToValidate="ItemPriceTextBox">消费项目价格不是正确的格式</asp:RegularExpressionValidator>
                                    </td>
                                </tr>
                                <tr>
                                    <td align="center">消费项目类型：</td>
                                    <td>
                                        <asp:DropDownList ID="SpendTypeDropDownList" runat="server" 
                                            DataSourceID="SourceSpendType" DataTextField="SpendTypeName" 
                                            DataValueField="SpendTypeId" />
                                    </td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                    <tr>
                        <td>&nbsp;</td>
                    </tr>
                    <tr>
                        <td align="center">
                            <asp:ImageButton ID="ImageButton1" runat="server" ImageUrl="~/images/an11.gif" onclick="AddImageButton_Click" />
                            &nbsp;&nbsp;&nbsp;&nbsp;
                            <asp:ImageButton ID="ImageButton2" runat="server" ImageUrl="~/images/an3.gif" OnClientClick="OnClearBtnClick();return false;" />
                        </td>
                    </tr>
                </table>
            </td>
          </tr>
        </table>
    </form>
</body>
</html>
